Skip to content

Overhaul configuration#1948

Merged
mrocklin merged 14 commits into
dask:masterfrom
mrocklin:config
May 6, 2018
Merged

Overhaul configuration#1948
mrocklin merged 14 commits into
dask:masterfrom
mrocklin:config

Conversation

@mrocklin

@mrocklin mrocklin commented Apr 30, 2018

Copy link
Copy Markdown
Member

This is a large overhaul of our configuration. It depends on dask/dask#3432 which centralizes configuration code in dask/dask.

In particular this does the following:

  1. The config dict moves from distributed.config to dask.config.config
  2. We now depend on the config values in distributed/distributed.yaml being in the config, allowing us to drop default values that were previously sprinkled around the codebase
  3. We change our configuration keys to be more hierarchical, so rather than {'scheduler-wait-time': ...} we get values more like {'scheduler': {'wait-time': ...}}.
  4. We establish a mechanism to migrate old config names to new ones.

dask/dask#3432 centralizes configuration in
dask/dask.

This commit updates dask/distributed for these changes.
Notably we centralize all default values in distributed/config.yaml
which is now un-commented.  We merge it into the global configuration by
default on startup.
@mrocklin mrocklin changed the title Update configuration to match changes in Dask Overhaul configuration May 1, 2018
@mrocklin

mrocklin commented May 1, 2018

Copy link
Copy Markdown
Member Author

This could use review by people familiar with configuration systems.

cc @jakirkham @minrk @jacobtomlinson if you have time.

@jacobtomlinson jacobtomlinson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a nice overhaul. I've added a couple of comments but they are more questions that issues.

Looking at the test failures I imagine there are some outdated imports somewhere.

Comment thread distributed/security.py

def __init__(self, **kwargs):
self._init_from_dict(config)
self._init_from_dict(dask.config.config)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to double .config here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the dask.config module has a config dict. See dask/dask#3432 for the co-PR

Comment thread distributed/scheduler.py
user_priority = {k: user_priority for k in tasks}

priority = priority or order(tasks) # TODO: define order wrt old graph
priority = priority or dask.order.order(tasks) # TODO: define order wrt old graph

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to double .order here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, same as above. This change is somewhat orthogonal to this PR, I just decided to start using namespaces more heavily rather than direct imports.

@mrocklin

mrocklin commented May 1, 2018

Copy link
Copy Markdown
Member Author

Tests will fail hard on this PR until dask/dask#3432 is merged. The next release will have a strict dependence between dask/dask and dask/distributed.

@mrocklin mrocklin merged commit 399522b into dask:master May 6, 2018
@mrocklin mrocklin deleted the config branch May 6, 2018 12:26
hristog added a commit to hristog/distributed that referenced this pull request Mar 27, 2021
* `logging` was removed from the config in 399522b (distributed
PR dask#1948), and the assumption made in the present commit is that
it was done unintentionally, since docs/source/configuration.rst
(dask) wasn't updated at the same time with 399522b.

* Later down the line, in response to
https://stackoverflow.com/questions/57829474/dask-config-get-cannot-get-anything,
(dask PR dask#5374) was merged, which didn't update the documentation
either.

* The above two facts, combined together, suggest that `logging`
must've been removed unintentionally from the config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants